Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LLDB pretty-printing #8460

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add LLDB pretty-printing #8460

wants to merge 2 commits into from

Conversation

alexreinking
Copy link
Member

Pulling out changes from my rfactor work...

This PR adds some features for visualizing Halide's types in LLDB, which my IDE (CLion) uses. The IR printer supports a "summary" mode that replaces certain subexpressions / blocks with ellipses. This has greatly improved my debugging experience. I encourage others to add to this and tweak it.

@steven-johnson
Copy link
Contributor

Any idea how this works with "naked" LLDB? If so, adding a comment would be nice.

@alexreinking
Copy link
Member Author

This just installs pretty printers. So after loading the script via command script import ./tools/lldbhalide.py, it should just start using the IRPrinter functions to render Exprs and Stmts

.lldbinit Show resolved Hide resolved
@zvookin
Copy link
Member

zvookin commented Nov 5, 2024

Can you add some documentation mention so folks know it exists? Perhaps in the README or maybe an added page in the Doxygen? I guess it's Halide internal devr only, but having a couple lines on it in docs means it will get used. Probably also worth writing down the command line flags to use it with straight command line lldb.

@alexreinking
Copy link
Member Author

Can you add some documentation mention so folks know it exists? Perhaps in the README or maybe an added page in the Doxygen? I guess it's Halide internal devr only, but having a couple lines on it in docs means it will get used. Probably also worth writing down the command line flags to use it with straight command line lldb.

Of course -- I'll do that as I fix the indents I broke

@abadams
Copy link
Member

abadams commented Nov 5, 2024

Can you post some example lldb output with this enabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants